package com.icw.decoupling.defi.proxy;

import java.util.List;
import java.util.Map;

import org.springframework.data.repository.NoRepositoryBean;

import com.icw.basis.BasePoEntity;
import com.icw.utility.query.IcwCriteria;
import com.icw.utility.query.PageCount;

@NoRepositoryBean
public interface GenericDaoProxy {

	<T extends BasePoEntity> T expandEntityById(Class<T> entityClass, String id) throws Exception;

	<T extends BasePoEntity> void saveEntity(T obj) throws Exception;

	<T extends BasePoEntity> int updateByCriteria(Class<T> entityClass, Map<String, Object> contains, IcwCriteria cri) throws Exception;

	<T extends BasePoEntity> int deleteByCriteria(Class<T> entityClass, IcwCriteria delCri) throws Exception;

	<T extends BasePoEntity> int countByCriteria(Class<T> entityClass, IcwCriteria criteria) throws Exception;

	<T extends BasePoEntity> List<T> query(Class<T> entityClass, IcwCriteria criteria, PageCount page) throws Exception;
}
